<div class="layui-fluid nepadmin-pad0 nepadmin-mar0 list0"  lay-title="公众号自动回复">
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card layui-tab layui-tab-brief">
			<ul class="layui-tab-title">
			  <li class="layui-this">首次访问自动回复</li>
			</ul>

          <div class="layui-card-body layui-tab-content hxr-card-body" style="padding: 15px;">
			  <div class="layui-tab-item layui-show" id="bonusset">
				  <div class=" layui-form">
					  <form id="break_set" lay-filter="aa">
						  <div class="layui-form-item">
							  <label class="layui-form-label">回复内容</label>
							  <div class="layui-input-inline">

								  <textarea v-model="detail.key_value" autocomplete="off" style="width:800px;height:100px;" autocomplete="off" lay-verify="required"></textarea>

							  </div>
						  </div>
						  <div class="layui-form-item">
							  <label class="layui-form-label"></label>
							  <div class="layui-input-inline">
								  <button type="button" class="layui-btn" lay-submit style="width: 190px;" lay-filter="form-submit1" >保存</button>
							  </div>
						  </div>
					  </form>
				  </div>
			  </div>

          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<style type="text/css">
	#change_pwd .layui-form-label{
		width: 150px;
	}
	#change_cash_pwd .layui-form-label{
		width: 150px;
	}
</style>

<script>
	layui.use(['form','element'], function(form,element){
		var $ = layui.$,element = layui.element;
		var form = layui.form;
		var vm=new Vue({
			el:'#bonusset',
				data:{
					detail:{
					},
					old_detail:{}
				},
				mounted:function() {
					//初始化
					var _this=this;
					layui.admin.ajax('config/auto_config',{},1).then(function(res){

						_this.detail=res.data,_this.old_detail=JSON.stringify(res.data);
					});
					//提交form
					form.on('submit(form-submit1)',function(data){
						if(_this.detail.key_value == ''){
							return layui.admin.ahint(2,'请输入内容');
						}
						var data=layui.admin.filter(_this.detail,JSON.parse(_this.old_detail));

						if(data){
							layui.admin.ajax('config/set_auto',data).then(function(res){
								_this.old_detail=JSON.stringify(_this.detail);
							});
						}else{
							layer.msg('无修改');
						}
					})
				}
			})

	})
</script>
<!--<script>
layui.use(['admin','form'],function(admin,form){

    var $ = layui.jquery;
	//提交form
	var _this=this;
    //提交修改表单
    form.on('submit(form-submit1)',function(data){
        var loading = $(this).find('.layui-icon');
		var before_pwd = $('input[name="before_pwd"]').val();
		var after_pwd = $('input[name="after_pwd"]').val();
		var pwd = $('input[name="after_pwd_confim"]').val();

        if(after_pwd != pwd){
        	layer.msg('两次登录密码不一致');
        	return false;
        }//
        layui.admin.formapi('account/information_update',data.field);

        return false;
    })


})

</script>-->


